<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style>
        h3 {
            color: #00F;
            text-align: center;
        }

        table {
            margin: auto;
            text-align: center;
            width: 90%;
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid black;
        }

        tr:hover {
            background: #a1b1a1;
        }

        th {
            background-color: #3940a5;
            color: white;
        }
    </style>
</head>
<body>
    <h3>查看用户列表（JSTL标签方式）</h3>
    <table border="1">
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>密码</th>
            <th>年龄</th>
            <th>删除</th>
            <th>修改</th>
        </tr>
        <c:forEach var="lists" items="${lookListJSTL}" varStatus="s">
            <tr>
                <td>${s.count}</td>
                <td>${lists.user}</td>
                <td>${lists.pw}</td>
                <td>${lists.age}</td>
                <td><a href="${pageContext.request.contextPath}/delUserById.action?id=${lists.id}">删除</a></td>
                <td><a href="${pageContext.request.contextPath}/findUserById.action?id=${lists.id}">修改</a></td>
            </tr>
        </c:forEach>

    </table>
<br>
<br>
<a href="welcome.action">返回主页</a>
</body>
</html>
